<template>
  <div class="about" v-back="color">
    <h1>This is an about page</h1>
    <button @click="cut">切换颜色</button>
    <!-- <button @click="cut('blue')">blue</button> -->
  </div>
</template>
<script>
import { ref } from 'vue';
export default {
  setup(props) {
    const color = ref('');
    const cut = () => {
      // Math.random(); 0-1的随机数
       let val = "#" + Math.random().toString(16).substr(2,6);
      //  console.log(val);
       color.value = val;
    }
    return {
      color,
      cut
    }
  }
}
</script>

